home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13821 < prev    next >
Encoding:
Text File  |  1996-08-05  |  909 b   |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.ul.ie!usenet
  3. From: vincent.walsh@ul.ie (Vincent Walsh)
  4. Subject: Help trapping stdout from Unix system() call
  5. Message-ID: <DpnGsD.Mo2@ul.ie>
  6. Sender: walshv@ul.ie (Vincent Walsh)
  7. Nntp-Posting-Host: 136.201.5.93
  8. Organization: University of Limerick
  9. X-Newsreader: knews 0.9.6
  10. Date: Wed, 10 Apr 1996 14:12:12 GMT
  11.  
  12. Hi All,
  13. I have a problem and would appreciate is someone could help me!
  14.  
  15. Within a C program I call another C program and I want to trap the output 
  16. of the second C program into a buffer. I tried using fopen, etc.. and 
  17. system() calls, but to no avail.
  18. I also tried using popen to call the second C program and this trapped the
  19. stdout into a buffer, but not stderr. Which means my buffer will tell me 
  20. the results if the second program works, but my buffer is empty if the 
  21. second program outputs to stderr!!
  22.  
  23. I'm confused
  24.  
  25. Thanks
  26. Vincent Walsh
  27. vincent.walsh@ul.ie
  28.  
  29.